$this->mPosted = $request->wasPosted();
$this->mRequest =& $request;
$this->mName = 'userrights';
-
+
$titleObj = Title::makeTitle( NS_SPECIAL, 'Userrights' );
$this->action = $titleObj->escapeLocalURL();
}
if($u->getID() == 0) {
$wgOut->addWikiText( wfMsg( 'nosuchusershort', htmlspecialchars( $username ) ) );
return;
- }
+ }
$oldGroups = $u->getGroups();
$newGroups = $oldGroups;
$logcomment = ' ';
- // remove then add groups
+ // remove then add groups
if(isset($removegroup)) {
$newGroups = array_diff($newGroups, $removegroup);
foreach( $removegroup as $group ) {
}
}
$newGroups = array_unique( $newGroups );
-
+
wfDebug( 'oldGroups: ' . print_r( $oldGroups, true ) );
wfDebug( 'newGroups: ' . print_r( $newGroups, true ) );
*/
function switchForm() {
global $wgOut;
-
+
// user selection
$wgOut->addHTML( "<form name=\"uluser\" action=\"$this->action\" method=\"post\">\n" );
$wgOut->addHTML( $this->fieldset( 'lookup-user',
*/
function editUserGroupsForm($username) {
global $wgOut, $wgUser;
-
+
$user = User::newFromName($username);
if( is_null( $user ) || $user->getID() == 0 ) {
$wgOut->addWikiText( wfMsg( 'nosuchusershort', wfEscapeWikiText( $username ) ) );
return;
}
-
+
$groups = $user->getGroups();
$wgOut->addHTML( "<form name=\"editGroup\" action=\"$this->action\" method=\"post\">\n".